import _axios from './request'

// 获取用户自己信息
function user () {
  return _axios({
    method: 'get',
    url: '/v1_0/user',
    token: true
  })
}
function userProfile () {
  return _axios({
    method: 'get',
    url: '/v1_0/user/profile',
    token: true
  })
}
function userPhoto (data) {
  return _axios({
    method: 'patch',
    url: '/v1_0/user/photo',
    token: true,
    data
  })
}
function editUserProfile (data) {
  return _axios({
    method: 'patch',
    url: '/v1_0/user/profile',
    token: true,
    data
  })
}

export { user, userProfile, userPhoto, editUserProfile }
